package com.lanhu.designpattern.prototype.sample;

import java.util.List;

/**
 * author:zhangzg
 * date:2020/11/8 17:40
 * 打印文档
 */
public class WordDocument implements Cloneable{

    private String title;

    private String name;

    private List<String> document;

    public WordDocument(String title, String name) {
        this.title = title;
        this.name = name;
    }

    public WordDocument(String title, String name, List<String> document) {
        this.title = title;
        this.name = name;
        this.document = document;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    protected WordDocument clone(){
        WordDocument wordDocument = null;
        try {
            wordDocument = (WordDocument)super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return wordDocument;
    }

    public List<String> getDocument() {
        return document;
    }

    public void setDocument(List<String> document) {
        this.document = document;
    }

    @Override
    public String toString() {
        return "title = " + title + ",name = " + name;
    }
}
